package com.axonactive.training.dao;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import com.axonactive.training.model.Balance;

@Stateless
public class BalanceDao {
	@PersistenceContext
	private EntityManager em;
	
	public void saveBalance(Balance blc){
		em.persist(blc);
	}
	
	public Balance getBalance(){
		return em.createQuery("select b from Balance b", Balance.class).getSingleResult();		
	}
}
